// 异步路由// 异步路由
export const _asyncRoute = [
  {
    path: '/acl',
    name: 'Acl',
    meta: { title: '权限管理', icon: 'Edit', hidden: false },
    redirect: '/acl/user',
    component: () => import('@/layout/index.vue'),
    children: [
      {
        path: 'user',
        name: 'User',
        meta: { title: '用户管理', icon: 'UserFilled', hidden: false },
        component: () => import('@/views/acl/user/index.vue')
      },
      {
        path: 'role',
        name: 'Role',
        meta: { title: '角色管理', icon: 'Avatar', hidden: false },
        component: () => import('@/views/acl/role/index.vue')
      },
      {
        path: 'permission',
        name: 'Permission',
        meta: { title: '菜单管理', icon: 'Grid', hidden: false },
        component: () => import('@/views/acl/permission/index.vue')
      }
    ]
  },
  {
    path: '/product',
    name: 'Product',
    meta: { title: '产品管理', icon: 'GoodsFilled', hidden: false },
    redirect: '/product/trademark',
    component: () => import('@/layout/index.vue'),
    children: [
      {
        path: 'trademark',
        name: 'Trademark',
        meta: { title: '品牌管理', icon: 'Flag', hidden: false },
        component: () => import('@/views/product/trademark/index.vue')
      },
      {
        path: 'attr',
        name: 'Attr',
        meta: { title: 'ATTR管理', icon: 'Opportunity', hidden: false },
        component: () => import('@/views/product/attr/index.vue')
      },
      {
        path: 'spu',
        name: 'Spu',
        meta: { title: 'SPU管理', icon: 'Briefcase', hidden: false },
        component: () => import('@/views/product/spu/index.vue')
      },
      {
        path: 'sku',
        name: 'Sku',
        meta: { title: 'SKU管理', icon: 'Stamp', hidden: false },
        component: () => import('@/views/product/sku/index.vue')
      },
    ]
  }
]
export const asyncRoute = []

// 常量路由
export const constantRoute = [
  {
    path: '/',
    name: 'Layout',
    meta: { title: '', icon: '', hidden: false },
    component: () => import('@/layout/index.vue'),
    redirect: '/home',
    children: [
      {
        path: 'home',
        name: 'Home',
        meta: { title: '首页', icon: 'HomeFilled', hidden: false },
        component: () => import('@/views/home/index.vue')
      }
    ]
  },
  {
    path: '/screen',
    name: 'Screen',
    meta: { title: '数据大屏', icon: 'TrendCharts', hidden: false },
    component: () => import('@/views/screen/index.vue')
  },
  {
    path: '/login',
    name: 'Login',
    meta: { title: '登录', icon: 'Edit', hidden: true },
    component: () => import('@/views/login/index.vue')
  },
  {
    path: '/404',
    name: '404',
    meta: { title: '404', icon: 'Crop', hidden: true },
    component: () => import('@/views/404/index.vue')
  },
  ..._asyncRoute
]



// 任意路由
export const anyRoute = {
  path: '/:pathWatch(.*)*',
  name: 'Any',
  redirect: '/404',
  meta: { title: '任意路由', icon: 'StarFilled', hidden: true },
}
